package com.lqian;

/**
 * @author：Melody_LQ
 * @time：2022/7/31 5:44 下午
 */
public class TestMain {
    public static void main(String[] args) {
//        CollectionImpl collection = new CollectionImpl();
//        collection.method1();
//        collection.method2(100);
       new MyCollection(){

           @Override
           public void method1() {

           }
           @Override
           public void method2(int num) {

           }
       };
    }
}
class CollectionImpl implements MyCollection{
    @Override
    public void method1() {
        System.out.println("no params");
    }
    @Override
    public void method2(int num) {
        System.out.println("including params");
    }
}
// the code in MyCollection
// public interface MyCollection {
//    void method1();
//    void method2(int num);
//}